package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户对账记录
 * </p>
 *
 * @author jiangzhuan
 * @since 2020-12-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("member_assets_detail")
public class MemberAssetsDetail extends Model<MemberAssetsDetail> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 会员id
     */
    private Integer memberId;

    /**
     * 变帐金额
     */
    private String variableAmount;

    /**
     * 类型 1:邀请拉新
     */
    private Integer type;

    /**
     * 变帐原因
     */
    private String reason;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 关联member_assert
     */
    private Integer memberAssertId;

    /**
     * 统计金额显示 单位：元
     */
    private BigDecimal amount;


    public static final String ID = "id";

    public static final String MEMBER_ID = "member_id";

    public static final String VARIABLE_AMOUNT = "variable_amount";

    public static final String TYPE = "type";

    public static final String REASON = "reason";

    public static final String CREATE_TIME = "create_time";

    public static final String MEMBER_ASSERT_ID = "member_assert_id";

    public static final String AMOUNT = "amount";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
